Component({
  options: {
    addGlobalClass: true,
  },
  data: {
    visible: false,
  },
  /**
   * 组件的属性列表
   */ properties: {
    shopInfo: {
      type: Object,
      value: {},
    },
    orderDetail: {
      type: Object,
      value: {},
    },
  },
  ready() {
    wx.showShareMenu({
      withShareTicket: true,
      menus: ["shareAppMessage", "shareTimeline"],
    });
  },
  methods: {
    close() {
      this.triggerEvent("close");
    },
    open() {
      this.setData({ visible: true });
    },
    handleStop() {
      return true;
    },
    handleShareMoments() {
      this.close();
      this.triggerEvent("moments");
    },
    shareMenu() {
      this.triggerEvent("shareMenu");
    },
  },
});
